<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>ForFuture Group</title>
    <meta name="keywords" content="ForFuture Group| ganquanzhong">
    <meta name="description" content="网站服务提供技术支持！ SSM，Spring Boot，Spring Cloud解决方案">
    <link rel="stylesheet" type="text/css" href="/home/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="/home/css/nprogress.css">
    <link rel="stylesheet" type="text/css" href="/home/css/style.css">
    <link rel="stylesheet" type="text/css" href="/home/css/login.css">
    <link rel="stylesheet" type="text/css" href="/home/css/font-awesome.min.css">
    <link rel="apple-touch-icon-precomposed" href="/home/images/icon.png">
    <link rel="shortcut icon" href="/home/images/favicon.ico">
    <script src="/home/js/jquery-2.1.4.min.js"></script>
    <script src="/home/js/nprogress.js"></script>
    <script src="/home/js/jquery.lazyload.min.js"></script>
    <!--[if gte IE 9]>
    <script src="/home/js/jquery-1.11.1.min.js" type="text/javascript"></script>
    <script src="/home/js/html5shiv.min.js" type="text/javascript"></script>
    <script src="/home/js/respond.min.js" type="text/javascript"></script>
    <script src="/home/js/selectivizr-min.js" type="text/javascript"></script>
    <![endif]-->
    <script>
        function addFavorite(url, title) {
            try {
                window.external.addFavorite(url, title);
            } catch (e) {
                try {
                    window.sidebar.addPanel(title, url, '');
                } catch (e) {
                    alert("请按 Ctrl+D 键添加到收藏夹", 'notice');
                }
            }
        }
    </script>
</head>
<body <%--class="user-select"--%>>
<header class="header">
    <nav class="navbar navbar-default" id="navbar">
        <div class="container">
            <div class="header-topbar hidden-xs link-border">
                <ul class="site-nav topmenu">
                    <%--<li><a href="#">标签云</a></li>
                    <li><a href="#" rel="nofollow">读者墙</a></li>--%>
                    <li><a href="javascript:void(0);" onclick="dashangToggle()">打赏</a></li>
                    <c:if test="${sessionScope.newsuser.username == null}">
                        <li><a id="Login_start_"  href="#">登录</a></li>
                        <li><a id="Regist_start_" href="#" rel="nofollow">注册</a></li>
                    </c:if>
                    <c:if test="${sessionScope.newsuser.username != null}">
                        <li><a href="#">${sessionScope.newsuser.username},您好！</a></li>
                        <li><a id="exit_btn"  data-toggle="modal" data-target="#deleteModal" >注销</a></li>
                    </c:if>
                    <li><a href="#" onclick="addFavorite('http://javaaj.com','ForFuture Group')" title="RSS订阅">
                        <i class="fa fa-rss"> </i> 收藏</a>
                    </li>
                </ul>
                <%--一切为了你们！提供最好的服务！支持定制！！--%>
                ${sessionScope.header_topbar.name}
            </div>
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                        data-target="#header-navbar" aria-expanded="false">
					<span class="sr-only"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
                <h1 class="logo hvr-bounce-in">
                    <%--logo image--%>
                    <%--<a href="/" title="${sessionScope.logo_content.name}">
                    <img  src="/home/images/logo.png" alt="${sessionScope.logo_content.name}">
                    </a>--%>
                   <a href="javascript:void(0);" onclick="dashangToggle()" title="${sessionScope.logo_content.name}">
                       ${sessionScope.logo_content.name}
                   </a>
                </h1>
            </div>

            <div class="collapse navbar-collapse" id="header-navbar">
                <form class="navbar-form visible-xs" action="../search_list" method="get">
                    <div class="input-group">
                        <input type="text" name="keyword" class="form-control" placeholder="请输入关键字" maxlength="20"
                               autocomplete="off" value="${keyword }">
                        <span class="input-group-btn">
							<button class="btn btn-default btn-search" name="search" type="submit">搜索</button>
						</span>
					</div>
                </form>
            </div>
        </div>
        <%--导航栏--%>
        <div class="navigate">
            <div></div>
            <ul class="nav navbar-nav navbar-right" >
                <li>
                    <a data-cont="IT 设计，定制" title="IT 设计，定制" href="/">首页</a></li>
                <c:forEach items="${newsCategoryList }" var="newsCategory">
                    <li><a data-cont="${newsCategory.name }" title="${newsCategory.name }"
                           href="../category_list?cid=${newsCategory.id }">${newsCategory.name }</a></li>
                </c:forEach>
            </ul>
        </div>
    </nav>
</header>


<!--打赏 start-->
<div>
    <div class="dashang_content" >
        <div class="shang_box">
            <a class="shang_close" href="javascript:void(0)" onclick="dashangToggle()" title="关闭">
                <img src="http://ganquanzhong.top/upload/image/t_close.jpg"
                     style="width:10px;height:10px" alt="取消" /></a>
            <div class="shang_tit">
                <p>
                    『感谢您的支持🌹，我会继续努力的📌』
                </p>
            </div>
            <div class="shang_payimg">
                <img src="http://ganquanzhong.top/upload/image/t_alipay.png" alt="扫码支持" title="扫一扫" />
            </div>
            <div class="pay_explain">㊟：扫码打赏，你说多少就多少 ⚠</div>
            <div class="shang_payselect">
                <div class="pay_item checked" data-id="alipay">
                    <span class="radiobox"></span>
                    <span class="pay_logo">
					      <img src="http://ganquanzhong.top/upload/image/t_alipay.jpg"
                               style="width:82px;height:28px"  alt="支付宝" />
					</span>
                </div>
                <div class="pay_item" data-id="weipay">
                    <span class="radiobox"></span>
                    <span class="pay_logo">
					      <img src="http://ganquanzhong.top/upload/image/t_wechat.jpg"
                               style="width:115px;height:28px" alt="微信" />
					</span>
                </div>
            </div>
            <div class="shang_info">
                <p>打开<span id="shang_pay_txt" style="font-weight:bold; margin: 6px;">支付宝</span>扫一扫，即可进行扫码打赏哦!!</p>
                <p>Powered by
                    <a href="http://ganquanzhong.top" target="_blank" title="ForFuture Design">Design  ForFuture Group</a>
                    &nbsp;&nbsp; <a >gqzdev™💖</a>
                </p>
                <p>
                    <a  href="javascript:void(0);"  id="flag_for_china"  alt="ganquanzhong">
                        <img src="https://images.cnblogs.com/cnblogs_com/gqzdev/1564989/o_flag-for-china.png"  style="height: 120px;"
                             alt="China"/>
                    </a>
                </p>
            </div>

        </div>
    </div>
</div>
<!--打赏 end-->

<script>
    $(function () {
        //绑定滚动条事件
        $(window).bind("scroll", function () {
            var sTop = $(window).scrollTop();
            var sTop = parseInt(sTop);
            if (sTop >= 130) {
                if ($(".navigate").is(":visible")) {
                    try {
                        $(".navigate").slideUp();
                    } catch (e) {
                        $(".navigate").hide();
                    }
                }
            }
            else {
                if (!$(".navigate").is(":visible")) {
                    try {
                        $(".navigate").slideDown();
                    } catch (e) {
                        $(".navigate").show();
                    }
                }
            }
        });
    })


    $(function() {
        $(".pay_item").click(function() {
            $(this).addClass('checked').siblings('.pay_item').removeClass('checked');
            var dataid = $(this).attr('data-id');

            $(".shang_payimg img").attr("src", "http://ganquanzhong.top/upload/image/t_" + dataid + ".png");
            $("#shang_pay_txt").text(dataid == "alipay" ? "支付宝" : "微信");
        });
    });

    function dashangToggle() {
        $(".hide_box").fadeToggle();
        $(".shang_box").fadeToggle();
    }
</script>

